//
//  MessagePreview.swift
//  swiftUIdemo
//
//  Created by Z.cy on 2025/1/8.
//

import Foundation

struct MessagePreview: Hashable {
    var user: User
    var lastMessage: String
    static func == (lhs: MessagePreview, rhs: MessagePreview) -> Bool {
        lhs.user == rhs.user && lhs.lastMessage == rhs.lastMessage
    }
}

extension MessagePreview {
    static let example = MessagePreview(user: User.Other1, lastMessage: "Thank you!")
    static let examples = [
        MessagePreview(user: User.Other1, lastMessage: "From First User"),
        MessagePreview(user: User.Other2, lastMessage: "From Second User")
    ]
}
